In a packet-switched communication network, a master node may send to one or more slave nodes synchronization information formatted according to a synchronization protocol. In particular, the master node typically generates synchronization information related to its local clock (frequency and/or time of the day) and sends this information to the slave nodes within synchronization packets. Once the synchronization information is received at the slave nodes, it allows the slave nodes to synchronize the frequency and/or the time of the day of their respective clocks to those of the master node local clock.
Examples of known synchronization protocols are the “Network Time Protocol”, NTP, or the IEEE 1588™-2008 protocol, known as “Precision Time Protocol”, PTP, and defined in document “IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurements and Control Systems” by IEEE Instrumentation and Measurements Society, Jul. 24, 2008.
According to IEEE 1588™-2008 protocol (see document cited above, chapter 6, paragraph 6.6.3, pp. 32-34), the master node sends a Sync packet to a slave node and generates a first timestamp t1 indicating the time at which the master node sends the Sync packet. According to a so-called “one-step clock” mechanism, the first timestamp t1 is sent to the slave node within the Sync packet itself. Otherwise, according to a so-called “two-step clock” mechanism, the first timestamp t1 is sent to the slave node within a Follow-Up packet that the master node sends to the slave node after the Sync packet. The slave node in turn receives the Sync packet and generates a second timestamp t2 indicating the time at which the slave node receives the Sync packet. The slave node then sends to the master node a Delay_Req packet and generates a third timestamp t3 indicating the time at which the slave node sends such packet. The master node receives the Delay_Req packet and generates a fourth timestamp t4 indicating the time at which it receives such packet and in turn sends to the slave node the fourth timestamp t4 within a Delay_Resp packet.
At the end of the packet exchange described above, the four timestamps t1, t2, t3, t4 are available at the slave node. The above described packet exchange is typically periodically repeated. By using the four timestamps t1, t2, t3, t4, the slave node is able to synchronize the frequency and the time of the day of its local clock to those of the master node.
The packets transported across a packet-switched network, for instance an Ethernet network, are generally affected by delay variations depending on the network traffic conditions. Indeed, the packet-switched network nodes comprise devices generating variable delays that are not predictable a priori.
For example, at a node of the packet-switched network, each packet is received by an ingress physical interface, and it is then stored in an ingress FIFO buffer of the “Medium Access Control” (MAC) layer of the OSI Model. The packet is then processed within the node. Next, the packet is stored in an egress FIFO buffer of the MAC layer and then it is transmitted by an egress physical interface. The FIFO buffers have no traffic prioritization mechanisms. Hence, the packet is stored for a non predictable time in the FIFO buffers, and then experiences a not predictable residence time within the node.
The above considerations are valid both for data packets and synchronization packets. As far as synchronization packets are concerned, the not predictable delay variations are particularly critical, since they prevent the slave nodes from recovering the synchronization information generated by the master node with an acceptable accuracy, and thus from synchronizing their clock to the local clock of the master node.
The IEEE 1588™-2008 protocol defines a “transparent clock” mechanism (see chapter 6, paragraph 6.5.4 of the document cited above) at each node of the packet-switched network. This mechanism allows measuring the residence time of the synchronization packets (and, in particular, of the Sync and Delay_Req packets) within the node. This way, each slave node is able to recover the synchronization by taking into account the residence times of the synchronization packets within the nodes of the packet-switched network and therefore also the related delay variations. Indeed, upon reception of the synchronization packet, the node generates an ingress timestamp and when the node transmits the packets, it generates an egress timestamp. The residence time of the synchronization packet within the node is then computed as the difference between the egress timestamp and the ingress timestamp. According to the above mentioned one-step clock mechanism, the IEEE 1588™-2008 protocol provides for using the residence time for updating the content of a Correction Field of the synchronization packet itself before the synchronization packet is forwarded by the node. Otherwise, according to the above mentioned two-step clock mechanism, the IEEE 1588™-2008 protocol provides for forwarding the synchronization packet and using its residence time for updating the content of a Correction Field of a subsequent packet (either a Follow_Up packet or a Delay_Resp packet) associated to the synchronization packet.